package cn.zyq.ykb.beans.config;

import cn.zyq.ykb.beans.user.User;
import cn.zyq.ykb.system.common.BaseBean;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 操作记录对象 configRecord
 *
 * @author SystemAuth
 * @date 2023-05-24
 */
@Data
@Entity
@Table(name = "`configRecord`")
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class ConfigRecord  extends BaseBean implements Serializable {
    /**
     * 主键id，用于关联
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "JDBC")
    @Column(name = "`configRecordID`")
    @ApiModelProperty("主键id，用于关联")
    private Integer configRecordID;
    /**
     * 用户ID
     */
    @Column(name = "`userID`")
    @ApiModelProperty("用户ID")
    private Integer userID;
    /**
     * 道具类型（1.刷新，2.置顶，3.修改任务，4.修改价格，5.修改数量）
     */
    @Column(name = "`type`")
    @ApiModelProperty("道具类型（1.刷新，2.置顶，3.修改任务，4.修改价格，5.修改数量，6.开始任务，7.结束任务）")
    private Integer type;
    /**
     * 任务ID
     */
    @Column(name = "`taskID`")
    @ApiModelProperty("任务ID")
    private Integer taskID;
    /**
     * 内容
     */
    @Column(name = "`content`")
    @ApiModelProperty("内容")
    private String content;

    @Transient
    @ApiModelProperty("用户数据")
    private User user;

    public ConfigRecord(){}

    public ConfigRecord(Integer userID,Integer type,Integer taskID,String content){
        this.userID = userID;
        this.type = type;
        this.taskID = taskID;
        this.content =content;
    }

}
